package com.todo.partner.application.remote;

import com.todo.common.common.entity.response.BizResponse;
import com.todo.content.api.request.*;
import com.todo.content.api.response.ContentDetailResponse;
import com.todo.content.api.response.ContentInfoResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author azhebuxing
 * @date 2025/2/24 01:56
 * @description
 */
@FeignClient(name = "todoContentService",url = "http://localhost:18003")
public interface ContentInfoRemote {

    /**
     * 保存预校验
     *
     * @param request
     * @return
     */
    @PostMapping("/api/contentInfo/savePreCheck")
    BizResponse<Boolean> savePreCheck(@RequestBody SavePreCheckRequest request);

    /**
     * 新增内容详情
     *
     * @param request
     * @return
     */
    @PostMapping("/api/contentInfo/insertContentDetail")
    BizResponse<Long> insertContentDetail(@RequestBody InsertContentDetailRequest request);

    /**
     * 更新内容详情
     *
     * @param request
     * @return
     */
    @PostMapping("/api/contentInfo/updateContentDetail")
    BizResponse<Boolean> updateContentDetail(@RequestBody UpdateContentDetailRequest request);

    /**
     * 根据主键删除内容信息
     *
     * @param request
     * @return
     */
    @PostMapping("/api/contentInfo/removeContentDetailById")
    BizResponse<Boolean> removeContentDetailById(@RequestBody RemoveContentDetailByIdRequest request);

    /**
     * 根据主键查询内容详情
     *
     * @param request
     * @return
     */
    @PostMapping("/api/contentInfo/queryContentDetailById")
    BizResponse<ContentDetailResponse> queryContentDetailById(@RequestBody QueryContentDetailByIdRequest request);

    /**
     * 根据Id列表查询内容信息
     *
     * @param request
     * @return
     */
    @PostMapping("/api/contentInfo/queryContentInfoByIdList")
    BizResponse<List<ContentInfoResponse>> queryContentInfoByIdList(@RequestBody QueryContentInfoByIdListRequest request);
}
